Optimal. Leaf size=60 \[ -\frac {2 a^2 \tan (c+d x)}{3 d}-\frac {2 a^2 \sec (c+d x)}{3 d}+\frac {\sec ^3(c+d x) (a \sin (c+d x)+a)^2}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2855, 2669, 3767, 8} \[ -\frac {2 a^2 \tan (c+d x)}{3 d}-\frac {2 a^2 \sec (c+d x)}{3 d}+\frac {\sec ^3(c+d x) (a \sin (c+d x)+a)^2}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2669
Rule 2855
Rule 3767
Rubi steps
\begin {align*} \int \sec ^3(c+d x) (a+a \sin (c+d x))^2 \tan (c+d x) \, dx &=\frac {\sec ^3(c+d x) (a+a \sin (c+d x))^2}{3 d}-\frac {1}{3} (2 a) \int \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx\\ &=-\frac {2 a^2 \sec (c+d x)}{3 d}+\frac {\sec ^3(c+d x) (a+a \sin (c+d x))^2}{3 d}-\frac {1}{3} \left (2 a^2\right ) \int \sec ^2(c+d x) \, dx\\ &=-\frac {2 a^2 \sec (c+d x)}{3 d}+\frac {\sec ^3(c+d x) (a+a \sin (c+d x))^2}{3 d}+\frac {\left (2 a^2\right ) \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{3 d}\\ &=-\frac {2 a^2 \sec (c+d x)}{3 d}+\frac {\sec ^3(c+d x) (a+a \sin (c+d x))^2}{3 d}-\frac {2 a^2 \tan (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.29, size = 72, normalized size = 1.20 \[ \frac {a^2 \left (-3 \sin \left (\frac {1}{2} (c+d x)\right )+3 \cos \left (\frac {1}{2} (c+d x)\right )-2 \cos \left (\frac {3}{2} (c+d x)\right )\right )}{3 d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 98, normalized size = 1.63 \[ \frac {2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2} \cos \left (d x + c\right ) - a^{2} - {\left (2 \, a^{2} \cos \left (d x + c\right ) + a^{2}\right )} \sin \left (d x + c\right )}{3 \, {\left (d \cos \left (d x + c\right )^{2} - d \cos \left (d x + c\right ) + {\left (d \cos \left (d x + c\right ) + 2 \, d\right )} \sin \left (d x + c\right ) - 2 \, d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 38, normalized size = 0.63 \[ -\frac {2 \, {\left (3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a^{2}\right )}}{3 \, d {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.37, size = 99, normalized size = 1.65 \[ \frac {a^{2} \left (\frac {\sin ^{4}\left (d x +c \right )}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{3 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}\right )+\frac {2 a^{2} \left (\sin ^{3}\left (d x +c \right )\right )}{3 \cos \left (d x +c \right )^{3}}+\frac {a^{2}}{3 \cos \left (d x +c \right )^{3}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 56, normalized size = 0.93 \[ \frac {2 \, a^{2} \tan \left (d x + c\right )^{3} - \frac {{\left (3 \, \cos \left (d x + c\right )^{2} - 1\right )} a^{2}}{\cos \left (d x + c\right )^{3}} + \frac {a^{2}}{\cos \left (d x + c\right )^{3}}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.14, size = 34, normalized size = 0.57 \[ -\frac {2\,a^2\,\left (3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}{3\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________